<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:tiles="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8">
  <title>查询用户学号</title>
  <script type="text/javascript" th:src="@{/js/jquery/jquery-3.3.1.js}" src="js/jquery/jquery-3.3.1.js" ></script>
  <script type="text/javascript" th:src="@{/js/zw.js}" src="js/zw.js" ></script>
<link th:href="@{/css/login.css}" href="css/login.css" rel="stylesheet" type="text/css" media="all"/>
<link rel="stylesheet" th:href="@{/css/cloudstyle.css}" href="css/cloudstyle.css"/>
<!-- layer -->
<link type="text/css" rel="stylesheet" th:href="@{/plug/layui/css/layui.css}" media="all"/>
<script type="text/javascript" th:src="@{/plug/layui/layui.js}"  src="plug/layui/layui.js" ></script>
<style type="text/css">
input::-webkit-input-placeholder {
	color:#fff;
}
.div-a{ position:fixed; left:20px; top:20px; background:#F00;padding: 10px;color: #FFF;z-index: 999}  
.div-b{ position:fixed; right:20px; top:20px; background:#F00;padding: 10px;color: #FFF;z-index: 999}  
.div-b1{ position:fixed; left:150px; top:60px; padding: 10px;color: #FFF;z-index: 999}
.div-b2{ position:fixed; left:50px; top:90px; padding: 10px;color: #FFF;z-index: 999}  

</style>
<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>

</head>
<body onkeydown="key_down(event.keyCode);">
<div class="sky" style="position:absolute; width:100%; top:0px;height:100%;opacity:0.75;"></div>
<div class="login-form" style="position:relative;">
		<div class="div-b1" >
			<span ><a  href='/log' target='view_window' ><img src="imgs/hhit/hhit.png" alt="hhit"  style="position: relative; left: 45%; top:-15px; width: 150px; height: 150px;"/></a></span>
		</div>
		<h1><a  href='http://www.jack1996.com:8081/index' target='view_window' style='color:#FFF'>查询用户学号</a></h1>
		<a href="/jz">
			<div class="div-a">点我捐助服务器</div>   
		</a>
		<a href="/jz">
			<div class="div-b">点我捐助服务器</div>   
		</a>
		<div class="login-top" style="width: 700px;">
		<form class="layui-form">
			<div class="login-ic">
			    <div style="width:340px; float:left;">
				  <input type="text"  placeholder="学号" id="sno"/>
				  </div>
			    <div style="width:340px; float:left;">
				  <input type="text"  placeholder="accno" id="accno"/>
				  </div>
				<div class="clear"> </div>
			</div>
			
			<div class="login-ic">
				<input type="text"  placeholder="姓名" id="name"/>
				<div class="clear"> </div>
			</div>
			
			<div class="log-bwn">
				<input type="button"  id="login1" value="查询" />
			</div>
		</form>
		<table class="layui-hide" id="test"></table>
	</div>
</div>
	
</body>
</html>
<script>
function key_down(num){
	if(num == 13) {
		tijiao();
	}
}

layui.use(['table', 'form', 'layedit', 'laydate'], function(){
   var laydate = layui.laydate;
   var form = layui.form;
   var table = layui.table;
  
	laydate.render({
	   elem: '#start' //指定元素
	});
	
	laydate.render({
	   elem: '#end' //指定元素
	});
	
	$(document).on('click', '.login-ic', function(event) {
        $("#login1").removeAttr("disabled");
    	$("#login1").css({'background-color':'red'});
    });
	
	$(document).on('click','#login1', function(){
	  $("#login1").attr("disabled","disabled"); 
	  $("#login1").css({'background-color':'#708090'});
	  table.reload('test', { //表格的id
	        url:'/getInfo',
	        where: {
	        	 name: $("#name").val(),
		    	 sno : $("#sno").val(),
		    	 accno : $("#accno").val(),
		    	 ip : returnCitySN['cip'],
		    	 city : returnCitySN['cname']
	        }
	    });
  });
  
  
  table.render({
	    elem: '#test'
	    ,url:'/getInfo'
	    ,where:
         {
	    	 name: $("#name").val(),
	    	 sno : $("#sno").val(),
	    	 accno : $("#accno").val(),
	    	 ip : returnCitySN['cip'],
	    	 city : returnCitySN['cname']
        }
	    ,page: { //支持传入 laypage 组件的所有参数（某些参数除外，如：jump/elem） - 详见文档
	      layout: ['limit', 'count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
	      ,groups: 1 //只显示 1 个连续页码
	      ,first: false //不显示首页
	      ,last: false //不显示尾页
	    }
	    ,cols: [
	    	[
	    	  {field:'name', width:125, title: '姓名'}
		      ,{field:'sno', width:200, title: '学号'}
		      ,{field:'pwd', width:200, title: '密码'}
		      ,{field:'accno', width:170, title: 'accno'}
	        ]
	    ]
	  });
});

$(function(){
	$('body').on('input propertychange', '.login-ic', function(event) {
        $("#login1").removeAttr("disabled");
    	$("#login1").css({'background-color':'red'});
    });
});
</script>